const baseURL='https://se1zcx96.lc-cn-n1-shared.com'
export const $http=function(url,method='GET',data={}){
	return new Promise((resolve,reject)=>{
		uni.request({
			url:baseURL+url,
			method:'GET',
			header:{
				'X-LC-Id': 'SE1zCX96WxeRzvNyhm5rdVMI-gzGzoHsz',
				'X-LC-Key': '92BR3Wc2daMq9gUWib15J6Q5',
				'Content-Type': 'application/json',
			},
			data,
			success:(res)=>{
				resolve(res.data)
			},
			fail:(err)=>{
				reject(err)
			}
		})
	})
}

export const $get=function(url,data={}){
	return $http(url,'GET',data)
}

export const $post=function(url,data={}){
	return $http(url,'POST',data)
}